package com.ruoyi.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.demo.domain.roomUsage;
import com.ruoyi.demo.domain.vo.roomSelectVo;
import com.ruoyi.demo.mapper.RoomUsageMapper;
import com.ruoyi.demo.service.IRoomUsageService;
import org.springframework.stereotype.Service;
//1
import javax.annotation.Resource;
import java.util.List;

@Service
public class RoomUsageServiceImpl extends ServiceImpl<RoomUsageMapper,roomUsage> implements IRoomUsageService {
    @Resource
    RoomUsageMapper roomUsageMapper;

    @Override
    public int getRoomSum() {
        return roomUsageMapper.getRoomSum();
    }

    @Override
    public int getTodayReserveCount() {
        return roomUsageMapper.getTodayReserveCount();
    }

    @Override
    public String getRoomUsageRate() {
        return roomUsageMapper.getRoomUsageRate()+"%";
    }

    @Override
    public int getThisMonthReserveSum() {
        return roomUsageMapper.getThisMonthReserveSum();
    }

    @Override
    public List<roomSelectVo> getRoomList() {
        return roomUsageMapper.getRoomList();
    }
}
